package NGUYENTHECUONG_DEMO;


public class Student {
	
	//1. Bien toan cuc (datafield) : Co the goi duoc bien nay tai bat ky dau trong lop doi tuong
	private int RollNo;
	private String FullName;
	private double Mark;
	/*void PrintInfo01(){ // phuong thuc khong tra ve gia tri
			
		RollNo = 100;
		String FullName="Nguyen Van A";// Bien cuc bo, chi trong ham hoac khoi ham
	}
	void PrintInfo02(){
			
		RollNo = 200;
		
	}
*/
	// 2. Ham khoi dung  : trung ten voi ten lop doi tuong, khong co kieu tra ve, mac dinh pham 
	// vi truy cap la public, co 2 kieu ham khoi dung la co tham so va khong  tham so
	public Student(){
		// khoi tao gia tri mac dinh doi tuong khi duoc sinh ra
		RollNo =1;
		FullName= "Example";
		Mark =0.0;
	}
	Student(int rollNo, String FullName, double Mark){
		// Su dung theo tham so cho doi tuong
		// cu phap datafield = tham so
		RollNo=rollNo;
		this.FullName= FullName;
		this.Mark=Mark;
	}
	// thuoc tinh
	// La phuong thuc su dung de the hien thong tin bien toan cuc thong qua Get hoac Set
	public int getRollNo(){
		return RollNo;
	}
	public void setRollNo(int RollNo){
		 this.RollNo=RollNo;
	}
	// su dung chuc nang sinh ma tu dong cho cac thuoc tinh con lai
	public String getFullName() {
		return FullName;
	}
	public void setFullName(String fullName) {
		FullName = fullName;
	}
	public double getMark() {
		return Mark;
	}
	public void setMark(double mark) {
		Mark = mark;
	}
	public String Dihoc(){
		return "SV dang di hoc";
	}
	public String TocDoDi(){
		return "200 km/h";
	}
}











